1. Field of the Invention
The present invention relates to a technique for detecting peaks in a sinusoidal digital signal. In particular, the present invention provides a method and system for detecting peak values in sinusoidal digital signals having noise, harmonics and other disturbances therein.
2. Description of the Prior Art
Numerous systems and applications require identifying the peak value in a digitized sinusoidal signal. One such application is the Digital Integrator V/HZ Relay as described below and in parent U.S. patent application Ser. No. 08/647,589, now U.S. Pat. No. 5,671,112 entitled "Digital Integrator V/Hz Relay for Generator and Transformer Over-Excitation Protection." This technique may also be used in overvoltage and overcurrent detection systems and the like.
A problem often encountered in peak detection of a sinusoidal digital signal is the existence of noise or harmonics in the signal. The existence of noise greatly increases the difficulty of identifying a true peak value. As shown in FIG. 1, a rectified sinusoidal waveform has a smooth and consistent pattern. This smooth pattern lends itself to easily identifying the peak in each half-cycle of the signal. This same rectified sinusoidal waveform with noise and harmonics in the signal might appear as shown in FIG. 2. As shown, the noise and disturbances give the sinusoidal waveform an irregular and random shape which significantly increases the difficulty of detecting a true peak. For example, when detecting peak values, the peak values are often identified for each half cycle of a signal between zero crossing points 10 (FIG. 1). However, in a signal containing noise as shown in FIG. 2, often the signal values are artificially high and therefore have no zero crossing between half-cycles, as shown by points 12 and 14. This lack of zero crossing points complicates the process of detecting a peak value for each half cycle.
Also, as shown in FIG. 2, noise in the signal creates numerous small peak values, i.e., values which are greater than both the preceding and succeeding values. Such peaks, designated by reference numerals 16 and 18 in FIG. 2, are not true peaks in the signal. However, delineating between these artificial peaks and legitimate peak values is a not easily accomplished. It is difficult to determine whether a rise or fall in the sign wave is a true increase or decrease in the signal, or rather a random fluctuation due to noise or a harmonic. Thus, the random and artificial values associated with noise in a signal increase the difficulty of identifying a true peak. A technique is desired which identifies the true peak without falsely identifying local noise spikes as a peak.
As noted above, one system in which it is necessary to identify a peak for a digital signal is a digital integrator V/Hz relay. V/Hz relaying is conventionally used to protect generators and transformers from the damage caused by over-excitation, where the ratio of V/Hz is used as the measure of the generator's or transformer's over-excitation. As known to those skilled in the art, the excitation level of a generator or a transformer can be accurately measured by the ratio of the voltage magnitude over the frequency of a voltage impressed on them, thus the name V/Hz protection. Typically, the generator and transformer V/Hz protection function is required to work across the wide frequency range (5-80 Hz) which is experienced by a generator or a generator-transformer unit. Generally, a high V/Hz condition may occur during the start up or shut down of a generator when the speed of the generator is low and during a sudden load rejection or as a result of a certain system disturbance when the voltage suddenly becomes high while the frequency is only changed slightly or is not changed.
Conventional analog integrator type V/Hz relays (solid-state) can provide sufficient over excitation protection in the desired frequency range with high accuracy. The analog integrator can be viewed as a special type of low-pass filter with a frequency response characteristic that is inversely proportional to the input signal's frequency. As shown in FIG. 3, the basic circuit of an analog V/Hz relay is an analog integrator 90. Those skilled in the art will appreciate that the analog integrator 90 shown in FIG. 3 is not an ideal integrator, but that it becomes an ideal integrator if R.sub.2 is infinite. This characteristic causes the integrator 90 to become unstable. However, by carefully selecting the values of the R.sub.1, R.sub.2 and C, the integrator 90 can approach the ideal integrator and still remain stable.
The transfer function of the analog integrator 90 of FIG. 3 is H(s)=A/(s-p), where A=-1/R.sub.1 C and p=-1/R.sub.2 C, and the frequency response of the integrator transfer function is obtained by substituting "s" with "j.omega.", i.e.: ##EQU1##
Equation (2) shows that the magnitude of the output signal V.sub.o from analog integrator 90 is proportional to the magnitude of the input signal V.sub.i and inversely proportional to the frequency of the input signal, if .omega.&gt;&gt;p. For a practical circuit with R.sub.1 =150 k.OMEGA., R.sub.2 =1 M.OMEGA., and C=0.1 .mu.F, its parameters are: A=-66.7 and p=-10. The actual .vertline.H(.omega.).vertline. and ideal (.vertline.A.vertline./.omega.) frequency response curves are plotted in FIGS. 4A and 4b and the relative error of .vertline.H(.omega.).vertline. is plotted in FIG. 4c, where the relative error of .vertline.H(.omega.).vertline. is defined as: ##EQU2##
As FIGS. 4A, 4b and 4c show, .vertline.H(.omega.).vertline. and ideal (.vertline.A.vertline./.omega.) are very close to each other. Thus, the analog integrator 90 can be used for V/Hz protection across a wide frequency range. In fact, the analog integrator 90 of FIG. 3 could work down to very low frequencies and still maintain an acceptable accuracy (relative error &lt;0.5% from 20 Hz and up and relative error &lt;4% from 5 Hz and up, for the above example). Such an integrator is always stable provided the real part of "p" is less than zero, which is the case in the above example.
From the above error equation, the smaller the value of .vertline.p.vertline. is, the smaller the relative error between .vertline.H(.omega.).vertline. of the above analog integrator and the ideal (.vertline.A.vertline./.omega.) is. However, since the transient response time constant of the circuit is T.sub.d =.vertline.1/p.vertline., the parameter p also determines the time delay of the circuit in response to a sudden change of the input signal. In the above example, the time constant is T.sub.d =1/10=0.1 second, which is small. Thus, the parameter p could be chosen, such as in the above example, to obtain an .vertline.H(.omega.).vertline. characteristic which is close to the ideal (.vertline.A.vertline./.omega.) without introducing excessive transient response time delay.
Those skilled in the art will also appreciate that the analog V/Hz relay uses a peak-detection circuit to determine the peak value of the output signal of the analog integrator, which is representative of the V/Hz value, to implement the inverse time delay characteristic, or a level detect circuit when a fixed time delay characteristic is used. The present invention relates to an improved technique for determining the peak value of the output signal.
Digital V/Hz relay protection systems are generally known. For example, a prior art digital programmed overexcitation protective relay is described in U.S. Pat. No. 4,694,374 to Verbanets, Jr. The relay described by Verbanets, Jr. generates a first signal representative of the V/Hz value by integrating samples of a full cycle rectified voltage signal over a half cycle between two zero crossings using the trapezoidal or parabolic method or both. The first signal is then averaged over a predetermined period to generate a second signal, which is used to derive the time-to-trip for inverse time trip operation of the relay according to the disclosed method. The voltage signal used to compute the first signal is sampled at a predetermined fixed sampling frequency. Full cycle rectification circuits, zero-crossing detectors, and other special hardware are used to assist in the relay operation. The integration process of the half cycle sampled data is different depending on whether an even or odd number of samples is contained in the half cycle. A clean up procedure is applied to correct the error caused by the partial interval integration at the first and the last interval of a half cycle. Thus, in this relay, the first signal is a discrete signal which is output once in a half cycle, while the second signal is also a discrete signal which is output once in a predetermined period. However, the requirement of additional special hardware makes this type of V/Hz relay system less desirable.
The Discrete Fourier Transform (DFT) technique is conventionally used in digital protection systems to compute phasors of the input voltage and current signals for use by the different protection functions. To obtain an accurate DFT computation result, the samples used in the DFT computation must be taken from one fundamental cycle of the signal and be evenly spaced. If such sampling conditions are not met, the computed DFT phasors will be in error due to the well known spectrum leakage and picket fencing problems. In an integrated (multi-function) generator protection system using a DFT algorithm, the fundamental frequency of the voltage and current signals is not fixed but varies. As a result, the following techniques have to be used to compute the phasors correctly: (1) the sampling frequency is varied to keep a fixed number of samples per cycle which is equal to the fixed number of data points used in the DFT computation; or (2) the sampling is conducted at a fixed frequency but the DFT window length is varied to keep the number of data points used in the DFT computation equal to the number of samples in one cycle. In the varying sampling frequency approach, the frequency of the input voltage, which is used to dynamically change the sampling frequency, is obtained as the result of frequency tracking. In the varying DFT window approach, on the other hand, the frequency of the input voltage, which is used to change the DFT window length, is obtained as the result of frequency estimation using the DFT phasor angle difference.
The computation of the V/Hz value in an integrated digital generator protection system using either of the above-mentioned DFT-based techniques appears to be relatively straightforward, since on its face all that is required is dividing the measured voltage by the measured frequency. However, this approach cannot provide an accurate V/Hz measurement in the desired operating frequency range of a V/Hz relay as the frequency approaches zero, for neither of the two above-mentioned techniques are suitable at low frequencies due to aliasing (the need of a very low cutoff frequency filter), the response time (the need to wait for one cycle of data to become available), and other problems. If the anti-aliasing is not performed properly, errors will occur in the phasor computation according to the well-known Nyquist Theorem. To avoid such aliasing problems, the sampling frequency must be fixed at the value corresponding to the low frequency limit of the varying sampling frequency approach when the actual frequency is below that limit, or the DFT window length must be fixed at the length corresponding to the low frequency limit in the varying DFT window length approach when the actual frequency is below the limit. Unfortunately, even with such anti-aliasing measures applied, the phasor computation and the frequency estimation still contain errors for both DFT techniques when the actual frequency is below the low frequency limit established by the Nyquist Theorem, for the DFT is no longer performed on samples in a single cycle. Consequently, the V/Hz value computed using the voltage phasor and the estimated frequency is inaccurate when the actual frequency is below the low frequency limit, which may occur during a generator's start-up and shut-down process when its speed is low.
Unlike the V/Hz relay, most of the generator protection functions are only required to operate when a generator is running around its nominal speed. The operating frequency range provided by the varying sampling frequency approach or the varying DFT window length approach is thus sufficient for the correct operation of these protection functions. It would be advantageous for an integrated generator protection system to use DFT techniques for these functions while using other techniques to perform a more accurate V/Hz protection function and other protection functions which are required to operate in a much wider frequency range so that overall better system performance can be achieved. As will be described in detail below, the relay system described herein which implements the preferred embodiment of the digital peak detector of the present invention has been designed to address this problem for fixed and variable sampling frequencies by directly computing an accurate V/Hz ratio from the sampled input voltage signal so that the results are similar or improved in comparison with the prior art analog circuit of FIG. 3.
Since the relay system incorporating the digital peak detector of the present invention uses digital samples for the V/Hz trip determination, the relay system is obviously different from an analog V/Hz relay using an analog integrator where both input and output signals are continuous signals. As will also be appreciated from the following detailed description, such a relay system further differs from the DFT based V/Hz relaying technique where the value of V/Hz is obtained by dividing the voltage magnitude by the frequency computed separately from the DFT and the frequency estimation technique in that the ratio of V/Hz of the sinusoidal input signal is obtained directly. In addition, the relay system described herein as incorporating the preferred embodiment of the digital peak detector of the present invention differs from the programmed overexcitation protective relay taught by Verbanets, Jr. since Verbanets, Jr. uses a non-recursive digital integration method supported by special hardware for the derivation of the V/Hz values by integrating samples of a full cycle rectified voltage signal over a half cycle between two zero crossings using trapezoidal or parabolic methods, or both. The integrated generator protection system of the relay system herein described does not require such additional hardware support for the V/Hz relay. Instead, the relay system described herein uses the same voltage samples as used by the above-mentioned DFT techniques to perform V/Hz relaying in the desired operating frequency range and operates independently regardless of the sampling frequency approach (fixed or varying) being used in the system. Details of the implementation of the invention will be provided in the following detailed description.